home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / c / AmiVoGL_MDEV.lha / examples / fsinwave.for < prev    next >
Text File  |  1991-07-14  |  775b  |  61 lines

  1.     program sine
  2.  
  3. $INCLUDE: 'fvogl.h'
  4. $INCLUDE: 'fvodevic.h'
  5.  
  6.     parameter(PI = 3.141592653589)
  7.     integer *2 val
  8.     real v(0:1)
  9.  
  10.     step = PI / 180.0
  11.  
  12.     call winope('bgnline/endline test', 20)
  13.     call unqdev(INPUT)
  14.     call qdevic(KEYBD)
  15.  
  16.     call color(BLACK)
  17.     call clear
  18.     call ortho2(-0.5, 2 * PI + .5, -1.5, 1.5)
  19.  
  20.     call color(GREEN)
  21.     call bgnlin
  22.         v(0) = -0.5
  23.         v(1) = 0.0
  24.         call v2f(v)
  25.  
  26.         v(0) = 2 * PI + .5
  27.         v(1) = 0.0
  28.         call v2f(v)
  29.     call endlin
  30.  
  31.     call color(RED)
  32.     call bgnlin
  33.         v(0) = 0.0
  34.         v(1) = -1.3
  35.         call v2f(v)
  36.  
  37.         v(0) = 0.0
  38.         v(1) = 1.3
  39.         call v2f(v)
  40.     call endlin
  41.  
  42.  
  43.     call color(YELLOW)
  44.     call bgnlin
  45.         v(0) = 0.0
  46.         v(1) = 0.0
  47.         call v2f(v)
  48.  
  49.         do 10 a = 0.0, 2 * PI, step
  50.             v(0) = a
  51.             v(1) = sin(a)
  52.             call v2f(v)
  53. 10        continue
  54.     call endlin
  55.  
  56.     idum = qread(val)
  57.  
  58.     call gexit 
  59.  
  60.     end
  61.